package com.xx.ch07.demo.demo19;

import com.xx.ch07.demo.demo01.SysUser1;
import com.xx.ch07.demo.demo08.SysUserService;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author 许欣
 * 时间：2022/4/18 11:34
 * 描述：
 */
public class Test1 {
    @Test
    public void testAddUser(){
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext.xml");
        SysUserService userService= (SysUserService) context.getBean("sysUserService");
        SysUser1 sysUser1=new SysUser1();
        boolean result=userService.add(sysUser1);
        System.out.println("testAdd result:"+result);
    }
}
